package com.devbobcorn.nekoration.client.rendering.blockentities;

import net.minecraft.block.BlockState;
import net.minecraft.fluid.FluidState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockDisplayReader;
import net.minecraft.world.World;
import net.minecraft.world.level.ColorResolver;
import net.minecraft.world.lighting.WorldLightManager;

public class CustomRendererTintGetter implements IBlockDisplayReader {
    private World world;
    private int color = 0;

    public CustomRendererTintGetter(World world)
    {
        this.world = world;
    }

    public void SetCustomTint(int rgb)
    {
        color = rgb;
    }

    @Override
    public TileEntity getBlockEntity(BlockPos pos) {
        return world.getBlockEntity(pos);
    }

    @Override
    public BlockState getBlockState(BlockPos pos) {
        return world.getBlockState(pos);
    }

    @Override
    public FluidState getFluidState(BlockPos pos) {
        return world.getFluidState(pos);
    }

    @Override
    public float getShade(Direction dir, boolean wtf) {
        return world.getShade(dir, wtf);
    }

    @Override
    public WorldLightManager getLightEngine() {
        return world.getLightEngine();
    }

    @Override
    public int getBlockTint(BlockPos pos, ColorResolver iDonCare) {
        return color;
    }
    
}
